#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H

#include <QString>
#include <QMap>
#include "../nlohmann/json.h"

using json = nlohmann::json;

class ConfigManager
{
public:
    static ConfigManager& instance();

    bool loadConfig(const QString& path);
    QString getString(const QString& keyPath, const QString& defaultValue = "");
    int getInt(const QString& keyPath, int defaultValue = 0);
    bool getBool(const QString& keyPath, bool defaultValue = false);

private:
    ConfigManager() = default;
    json m_config;

    json* findJsonByPath(const QString& keyPath);
};

#endif // CONFIGMANAGER_H
